package com.zs.proxy;

import java.lang.reflect.Proxy;

/**
 * @author ZhouShuang
 * @version 17
 * @Title
 * @date 2025/6/10 下午10:47
 */
public class IntermediaryJdkProxyFactory2 {

    public static <T> T create(Object target){
        IntermediaryInvocationHandler2 handler2 = new IntermediaryInvocationHandler2();
        handler2.setTarget(target);
        return (T) Proxy.newProxyInstance(target.getClass().getClassLoader(), target.getClass().getInterfaces(), handler2);
    }
}
